/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.googlecode.jsimplemarket.model;

import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Alexandru.Codescu
 */
@Entity
@Table(name = "i_inchirieri")
public class IstoricInchirieri extends AbstractIstoric {
    private SpatiuComercial spatiuComercial;
    private Firma firma;
    private List<ObservatieInchiriere> observatii;
    private List<Taxa> taxe;

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(name = "ID_SPATIU_COMERCIAL")
    public SpatiuComercial getSpatiuComercial() {
        return spatiuComercial;
    }

    public void setSpatiuComercial(SpatiuComercial spatiuComercial) {
        this.spatiuComercial = spatiuComercial;
    }

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(name = "ID_FIRMA")
    public Firma getFirma() {
        return firma;
    }

    public void setFirma(Firma firma) {
        this.firma = firma;
    }

    @OneToMany(fetch = FetchType.LAZY)
    @JoinColumn(name = "ID_INCHIRIERE")
    public List<ObservatieInchiriere> getObservatii() {
        return observatii;
    }

    public void setObservatii(List<ObservatieInchiriere> observatii) {
        this.observatii = observatii;
    }

    @OneToMany(fetch = FetchType.LAZY)
    @JoinColumn(name = "ID_INCHIRIERE")
    public List<Taxa> getTaxe() {
        return taxe;
    }

    public void setTaxe(List<Taxa> taxe) {
        this.taxe = taxe;
    }
}
